package com.zch.spring_demo.work.controller.filter;


import javax.servlet.*;
import javax.servlet.annotation.WebFilter;
import java.io.IOException;

/**
 * @author biscuit
 * @data 2018/01/15
 */
@WebFilter(urlPatterns = "/*")
public class MyFilter1 implements Filter {
    @Override
    public void init(FilterConfig filterConfig) throws ServletException {

    }

    @Override
    public void doFilter(ServletRequest srequest, ServletResponse sresponse, FilterChain filterChain) throws IOException, ServletException {
        System.out.println("Filter1");
        //放行
        filterChain.doFilter(srequest, sresponse);
    }

    @Override
    public void destroy() {

    }
}
